function BackendTool(settings){

    var defaultParams={
        "tips":"确定要进行当前操作吗?",
        "url":"",
        "method":"GET",
        "data":{},
        "popUpUrl":"",
        "dataType":"JSON"
    };
    this.params = $.extend(defaultParams,settings);

    this.successCallBack=function(data){
        if(data.result){
            layer.confirm(data.msg, {
                btn: ['确定'] //按钮
            }, function(){
                location.reload();
            });
        }else{
            layer.alert(data.msg)
        }
    };
}

/*
 Ajax请求参数
 */
BackendTool.prototype.ajaxRequest=function(){
    var _this = this;
    layer.confirm(_this.params.tips, {
            btn: ['确定','取消'] //按钮
        }, function(){
        $.ajax({
                    type: _this.params.method,
                    url: _this.params.url,
                    data:_this.params.data,
                    dataType:_this.params.dataType,
                    success: _this.successCallBack
                });
    });
};
